# encoding: utf-8

from utils.http import do_request
from urlConfig.urlList import send_private_message_url


def send_message_private(from_name, to_name, message):
    from config import settings
    if len(settings.jwtToken) == 0:
        return
    headers = {
        "Authorization": settings.jwtToken
    }
    data = {
        "from": from_name,
        "to": to_name,
        "message": message
    }
    response = do_request(method="post", url=send_private_message_url, json=data, headers=headers)
    # print("send_message_private response =", response.text)
